#!/bin/bash
FLAGS=$(grep ^flags /proc/cpuinfo | sed 's/.*://' | head -1)

echo 'Your processor supports:'
for f in $FLAGS; do
    case $f in
        fpu)
            MSG='floating point unit'
            ;;
        3dnow)
            MSG='3DOWN graphics extensions'
            ;;
        mtrr)
            MSG='memory type range register'
            ;;
        *)
            MSG='unknow'
            ;;
    esac
    echo $f: $MSG
done 
